<?php echo $header;echo $sidebar ?>
<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/admin/admin_js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
    selector: "textarea",
    theme: "modern",   
    plugins: [
         "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
         "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
         "save table contextmenu directionality emoticons template paste textcolor"
   ],
   content_css: "css/content.css",
   toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons", 
   style_formats: [
        {title: 'Bold text', inline: 'b'},
        {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
        {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
        {title: 'Example 1', inline: 'span', classes: 'example1'},
        {title: 'Example 2', inline: 'span', classes: 'example2'},
        {title: 'Table styles'},
        {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
    ]
 }); 
</script>



<style>
a.edit_icon {
	background: url("<?php echo $this->config->base_url(); ?>assets/admin/admin_images/icons/edit.gif") no-repeat scroll left top transparent;
	display: inline-block;
	height: 16px;
	width: 16px;
}
a.delete2_icon {
	background: url("<?php echo $this->config->base_url(); ?>assets/admin/images/icon/delete.png") no-repeat scroll left top transparent;
	display: inline-block;
	height: 16px;
	width: 16px;
}
ul.yiiPager {
	border: 0 none;
	display: inline;
	font-size: 11px;
	line-height: 100%;
	margin: 0;
	padding: 0;
}
ul.yiiPager a:link, ul.yiiPager a:visited {
	border: 1px solid #9AAFE5;
	color: #0E509E;
	font-weight: bold;
	padding: 1px 6px;
	text-decoration: none;
}
.star {
	color: red;
}
.required {
	color:#B94A48;
}
.error {
	color:#B94A48;
}
</style>
<div class="span10 content">
<?php echo $hugemenu ?>
<h1>Campaign template</h1>
<?php if($this->session->flashdata('message')) {?>
<div class="alert alert-success"> <?php echo $this->session->flashdata('message') ?> </div>
<?php  }?>
<br/>
<div> 
  <!-- Tab panes -->
  <div class="tab-content"> <?php echo form_open(current_url()); ?>
    <?php if($custom_error){ ?>
    <div class="alert alert-error"> <?php echo $custom_error ?> </div>
    <?php } ?>
    <div align="right">
      <input type="button" value="Upload Template" name="Create"  class="btn btn-primary" />
      <input type="button" value="Change/Select Template" name="Refresh" class="btn btn-primary" />
      <input type="button" value="Test Template" name="Refresh" class="btn btn-primary" />
      <input type="button" value="Cancel" name="Refresh" class="btn btn-primary" />
    </div>
    <div>
      <h5>Campaign template</h5>
      <table cellspacing="0" cellpadding="8" border="0"  width="100%" >
        <tbody>
          <tr>
            <td width="10%"><label for="inline_css">Inline css<span class="required">*</span></label></td>
            <td><?php
                                    $enum = array('no'=>'No','yes'=>'Yes'); 
                                    echo form_dropdown('inline_css', $enum,$campaign_template['inline_css']); 
                                    ?>
              <?php echo form_error('inline_css'); ?></td>
          </tr>
          <tr>
            <td><label for="auto_plain_text">Auto plain text<span class="required">*</span></label></td>
            <td><?php
                                    $enum = array('no'=>'No','yes'=>'Yes'); 
                                    echo form_dropdown('auto_plain_text', $enum,$campaign_template['auto_plain_text']); 
                                    ?>
              <?php echo form_error('auto_plain_text'); ?></td>
          </tr>
          <tr>
            <td><label for="content">Content<span class="required">*</span></label></td>
            <td><textarea id="content" name="content" rows="10" cols="40" class="textarea_box_big"><?php echo $campaign_template['content']; ?></textarea>
              <?php echo form_error('content'); ?></td>
          </tr>
        </tbody>
      </table>
    </div>
    <table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-right: 30px; margin-bottom: 10px;text-align:right">
      <tbody>
        <tr>
          <td><input type="submit" value="Save Changes" name="submit" class="btn btn-primary"></td>
        </tr>
      </tbody>
    </table>
    <?php echo form_close(); ?> </div>
</div>
<!--/content--> 
<?php echo $footer ?> 
<script>

$(document).ready( function () {
    $(".collapse").collapse()({
      show: false
      });
});
</script>